import QtQuick 1.1
import com.nokia.meego 1.0
//import com.nokia.symbian 1.0

Dialog {
    id: dialog
    property int score : 0
    signal nameInputted(string name)
    title: Label { /*Text {*/
        horizontalAlignment: Text.AlignHCenter
        width: parent.width
        height: 50
        color: "white"
        text: "New High Score:"+score
    }
    buttons: ButtonRow {
        anchors.horizontalCenter: parent.horizontalCenter
        Button {
            text: "Ok"
            onClicked: {
                if (textInput.text.length === 0) {
                    textInput.text = "Player1"
                }
                dialog.nameInputted(textInput.text)
                dialog.close()
            }
        }
        Button {
            text: "Cancel"
            onClicked: {
                dialog.close()
            }
        }
    }
    content:  TextField {
        id: textInput
        width: parent.width
        placeholderText:"Input your name"
//        focus: true
    }
}
